package com.dq.repository;


import com.dq.domain.sys.role.SysRole;
import com.dq.domain.sys.role.SysRoleSection;
import com.dq.domain.sys.section.SysSection;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @创建人 gewenzhen
 * @创建时间 2019/8/15
 * @描述
 */
public interface SysRoleSectionRepository extends JpaRepository<SysRoleSection, Long> {
    List<SysRoleSection> findByDeletedFalseAndSysRole(SysRole sysRole);
    List<SysRoleSection> findByDeletedFalseAndSection(SysSection section);

    List<SysRoleSection> findByDeletedFalseAndSysRoleAndSectionIdInOrderByIdDesc(SysRole sysRole, List<Long> sectionIdList);

    List<SysRoleSection> findByDeletedIsFalseAndSectionIdInOrderBySectionIdDesc(List<Long> sectionIds);
}
